import { Injectable } from '@angular/core';
import { BaseService } from '@core/routes-services/base.service';
import { CacheService } from '@core/routes-services/cache.service';
import { HttpClient } from '@angular/common/http';

/**
 * 业绩记录 服务
 */
@Injectable()
export class AchievementService extends BaseService {

  constructor(http: HttpClient, cacheService: CacheService) {
    super(http, cacheService);
  }

  base_url: any = 'api/marketAchievementRecord'


  /**
   * 分页
   *
   * @param user
   * @returns {Promise<any>}
   */
  pagination(page: any, keyword: any): Promise<any> {
    const url = this.base_url + '/pagination';
    if (keyword) {
      page['_filter_like_keyword'] = keyword;
    }
    return this.post(url, page);
  }


}
